<!DOCTYPE html>
<html>
	<head>
		<include file="public:meta" />
		<link rel="stylesheet" href="../public/css/index.css">
	</head>
	<body>
		<include file="public:search" />
		<div class="indextop">
			<if condition="$apply['Subsite']">
				<div class="m-sub-txt-group">
	                <div class="stg-txt">{:C('SUBSITE_VAL.s_sitename')}</div>
	                <div class="stg-icon"></div>
	                <div class="clear"></div>
	            </div>
	            <div class="m-sub-filter-page">
	                <div class="msp-head">
	                    <div class="msp-input-group">
	                        <div class="msg-icon-ser"></div>
	                        <input type="text" class="msg-input-ser" placeholder="输入地区名称进行筛选">
	                        <div class="clear"></div>
	                    </div>
	                    <div class="msp-cancel-btn">取消</div>
	                    <div class="clear"></div>
	                </div>
	                <div class="m-sub-head-tip font12">请您切换到对应的地区分站，让我们为您提供更准确的信息</div>
					<if condition="$subsite_org">
	                	<div class="m-sub-city-head link_blue">进入 <a href="{:U('subsite/set',array('sid'=>$subsite_org['s_id']))}">{$subsite_org.s_sitename}</a> 或者切换到以下站点</div>
					<else/>
						<div class="m-sub-city-head link_blue">切换到以下站点</div>
					</if>
	                <div class="m-sub-city-group">
		                <volist name="district" id="district">
		                    <div class="m-sub-city-box"><a href="{:U('subsite/set',array('sid'=>$district['s_id']))}" class="m-sub-city-cell" title="{$district.s_sitename}" alias="{$district.s_spell}">{$district.s_sitename}</a></div>
		                </volist>
	                    <div class="clear"></div>
	                </div>
					<div class="m-sub-city-no-data">
                        <div class="sub-no-data-cell link_blue">
                            抱歉，没有找到相关的地区立即进入 <a href="{:U('subsite/set',array('sid'=>0))}">[总站]</a>
                        </div>
                    </div>
	            </div>
			</if>
			<div class="logo"><img src="../public/images/02.png"></div>
	        <div class="user"><a href="{:U('Members/login')}"><img src="../public/images/03.png"></a></div>
		      <div class="clear"></div>
					<div class="index-slider">
						<div id="hwslider-count" class="hwslider hwslider-count">
							<ul class="count">
								<li class="active">已有 <strong class="jobs-roll-count">1</strong> 个有效职位</li>
								<li>已有 <strong class="resume-roll-count">1</strong> 份有效简历</li>
							</ul>
						</div>
					</div>
	        <div class="sbox font14 js-show-qspageso"><span>请输入职位名/公司名关键字</span>
	          <script>
			        // 显示搜索层
			        $('.js-show-qspageso').on('click', function(){
				        $('.qspageso').toggle();
			        });
		        </script>
	        </div>
		</div>
		<div class="index-slider">
			<div id="hwslider" class="hwslider">
				<ul>
					<li>
						<a href="{:url_rewrite('QS_jobslist')}"><dl class="l1"><dt class="job for-event"></dt><dd class="font12">找工作</dd></dl></a>
						<a href="{:url_rewrite('QS_resumelist')}"><dl class="l1"><dt class="resume for-event"></dt><dd class="font12">招人才</dd></dl></a>
						<a href="{:url_rewrite('QS_login')}"><dl class="l1"><dt class="fabu for-event"></dt><dd class="font12">我要发布</dd></dl></a>
						<a href="{:url_rewrite('QS_newslist')}"><dl class="l1"><dt class="news"></dt><dd class="font12 for-event">职场资讯</dd></dl></a>
						<div class="clear"></div>
					</li>
					<if condition="$apply['Jobfair'] || $apply['Mall']">
						<li>
							<notempty name="apply['Mall']">
							<a href="{:url_rewrite('QS_mall_index')}"><dl class="l1"><dt class="shop"></dt><dd class="font12 for-event">{:C('qscms_points_byname')}商城</dd></dl></a>
							</notempty>
							<notempty name="apply['Jobfair']">
							<a href="{:url_rewrite('QS_jobfairlist')}"><dl class="l1"><dt class="zhaoph"></dt><dd class="font12 for-event">招聘会</dd></dl></a>
							</notempty>
							<div class="clear"></div>
						</li>
					</if>
				</ul>
			</div>
		</div>
		<div class="indexnotice">
		  <div class="leftimg"><img src="../public/images/11.png"></div>
		  <qscms:notice_list 列表名="notice_list" 显示数目="10" 分类="1" 排序="addtime:desc"/>
			<ul class="txt ul-upscroll">
		  <volist name="notice_list['list']" id="notice">
		    <li class="" onClick="javascript:location.href='{$notice.url}'">{$notice.title}</li>
		  </volist>
			</ul>
		  <div class="clear"></div>
		</div>
		<div class="split-block"></div>
		<div class="indexhot font12 link_gray6">
		  <div class="hottitle font14 ">热门职位</div>
		  <qscms:hotword 列表名="hotword_list" 显示数目="12"/>
			<volist name="hotword_list" id="hotword">
			<if condition="C('qscms_key_urlencode') eq 1">
		    <a href="{:url_rewrite('QS_jobslist',array('key'=>urlencode($hotword['w_word_code'])))}" class="hotword substring for-event">{$hotword.w_word}</a>
		  	<else />
			<a href="{:url_rewrite('QS_jobslist',array('key'=>$hotword['w_word_code']))}" class="hotword substring for-event">{$hotword.w_word}</a>
		  	</if>
		    </volist>
		  <div class="clear"></div>
		</div>
		<div class="split-block"></div>
		<qscms:classify 列表名="jobsCate" 类型="QS_jobs"/>
		<div class="indexcat font12 link_gray6">
		  <volist name="jobsCate[0]" id="pcate">
		    <div class="cattitle img{$i} font14 ">{$pcate.categoryname}</div>
			<volist name="jobsCate[$key]" id="scate" key="k">
					<a href="{:url_rewrite('QS_jobslist',array('jobcategory'=>$scate['spell']))}" class="catword substring for-event">{$scate.categoryname}</a>
		    </volist>
		  <div class="clear"></div>
		  </volist>
		</div>
		<div class="split-block"></div>
		<include file="public:footer" />
		<include file="public:footer_min" />
	</body>
	<script src="../public/js/zepto.hwSlider.js"></script>
	<script src="../public/js/fx.js"></script>
	<script src="../public/js/touch-0.2.14.min.js"></script>
	<script src="../public/js/zepto.textSlider.js"></script>
	<script>
		// 职位、简历数量动态效果
		var jobCount = '{$jobs_count}';
		var resumeCount = '{$resume_count}';
		window.setTimeout(function() {
			$('.jobs-roll-count').empty();
			peopleRoll(jobCount, '.jobs-roll-count');
		}, 300)
		window.setTimeout(function() {
			$('.resume-roll-count').empty();
			peopleRoll(resumeCount, '.resume-roll-count');
		}, 5600)
		function peopleRoll(a, container) {
			function b(a) {
				for (var b = 0; b < a.length; b++) {
					var e = a.charAt(b);
					d.push(e)
				}
				c()
			}
			function c() {
				var a = 0;
				$(container).append("<span></span>");
				var b = window.setInterval(function() {
					$(container + " span").eq(e).text(a), a == d[e] && (window.clearInterval(b), e++, d[e] && c()), a++
				}, 30)
			}
			var d = [],
					e = 0,
					f = a + "";
			b(f)
		}
		
		// 职位简历数滚动
		$('#hwslider-count').hwSlider({
			autoPlay: true,
			dotShow: false,
			touch: false,
			interval: 5000,
			arrShow: false
		});
		
		// 滚动更多
		$("#hwslider").hwSlider({
			autoPlay: false,
			dotShow: true,
			touch: true,
			arrShow: false
		});
		
		$(".ul-upscroll").textSlider({line:1,speed:500,timer:3000});
		<if condition="$apply['Subsite']">
			// 显示分站
			<notempty name="subsite_org">
				showMSubPop();
		        function showMSubPop() {
		            var $mPop = new QSpopout();
		            $mPop.setContent('<div class="link_yellow" style="line-height: 180%;">我们检测到您所在地区为 {$district_org}，建议您切换至<a href="{:U('subsite/set',array('sid'=>$subsite_org['s_id']))}">[{$subsite_org['s_sitename']}]</a>，让我们为您提供更准确的职位信息。</div>');
		            $mPop.show();
		            $mPop.getPrimaryBtn().on('click', function () {
		                window.location.href = "{:U('subsite/set',array('sid'=>$subsite_org['s_id']))}";
		            });
		        }
			</notempty>
	        // 分站筛选
	        $('.m-sub-txt-group').on('click', function(){
	            $('.m-sub-filter-page').toggle();
	        });
	        $('.msp-cancel-btn').on('click', function () {
	            $('.m-sub-filter-page').toggle();
	        })
	        $('.msg-input-ser').on('keyup', function () {
				$('.m-sub-filter-page').addClass('no-head');
	            var tVal = $(this).val();
	            var $subCityArr = $('.m-sub-city-cell');
	            $('.m-sub-city-box').addClass('h');
	            $.each($subCityArr, function () {
	                var eVal = $(this).attr('title');
	                if (eVal.indexOf(tVal) != -1) {
	                    $(this).parent().removeClass('h');
						$('.m-sub-filter-page').removeClass('no-data');
	                }
	            })
				$.each($subCityArr, function () {
	                var eVal = $(this).attr('alias');
	                if (eVal.indexOf(tVal) != -1) {
	                    $(this).parent().removeClass('h');
						$('.m-sub-filter-page').removeClass('no-data');
	                }
	            })
	            if (!tVal.length) {
	                $('.m-sub-city-box').removeClass('h');
					$('.m-sub-filter-page').removeClass('no-head');
					$('.m-sub-filter-page').removeClass('no-data');
	            } else {
					if (!($('.m-sub-city-box').not('.h').length)) {
						$('.m-sub-filter-page').addClass('no-data');
					}
				}
	        })
	    </if>
	</script>
</html>